fix "working state" navigation to logs; remove underlining on "working state" links

Andrew Cantino 10 年之前
父節點
當前提交
ffa1fd5828
共有 2 個文件被更改,包括 3 次插入3 次删除
  1. 1 1
      app/assets/javascripts/application.js.coffee.erb
  2. 2 2
      app/helpers/application_helper.rb

+ 1 - 1
app/assets/javascripts/application.js.coffee.erb

@@ -127,7 +127,7 @@ $(document).ready ->
127 127
 
128 128
   if tab = window.location.href.match(/tab=(\w+)\b/i)?[1]
129 129
     if tab in ["details", "logs"]
130
-      $(".agent-show .nav-tabs li a[href='##{tab}']").click()
130
+      $(".agent-show .nav-pills li a[href='##{tab}']").click()
131 131
 
132 132
   # Editing Agents
133 133
   $("#agent_source_ids").on "change", showEventDescriptions

+ 2 - 2
app/helpers/application_helper.rb

@@ -9,11 +9,11 @@ module ApplicationHelper
9 9
 
10 10
   def working(agent)
11 11
     if agent.disabled?
12
-      link_to '<span class="label label-warning">Disabled</span>'.html_safe, agent_path(agent)
12
+      link_to 'Disabled', agent_path(agent), :class => 'label label-warning'
13 13
     elsif agent.working?
14 14
       '<span class="label label-success">Yes</span>'.html_safe
15 15
     else
16
-      link_to '<span class="label label-danger">No</span>'.html_safe, agent_path(agent, :tab => (agent.recent_error_logs? ? 'logs' : 'details'))
16
+      link_to 'No', agent_path(agent, :tab => (agent.recent_error_logs? ? 'logs' : 'details')), :class => 'label label-danger'
17 17
     end
18 18
   end
19 19
 end